package edu.hitsz;

import edu.hitsz.application.Main;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class ModeSelect {
    private JButton difficult_button;
    private JButton midiun_button;
    private JButton easy_button;
    private JCheckBox music_checkBox;
    private JPanel Panal;
    private JPanel top_panal;
    static JFrame frame = new JFrame("RankTable");

    public ModeSelect() {
        easy_button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                Main.Start(new String[]{"0"});
                frame.dispose();
            }
        });

        midiun_button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                Main.Start(new String[]{"1"});
                frame.dispose();
            }
        });

        difficult_button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                Main.Start(new String[]{"2"});
                frame.dispose();
            }
        });
    }

    public static void main(String[] args) {

        frame.setContentPane(new ModeSelect().Panal);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    }
}
